%show statistics as a function of forward probability

number_of_nodes = 30;
params = ParamsSingleton.instance();

%simulation params
router_type = params.router_type_ROMER;
params.simulation_time_in_msec = 1000;
params.clock_tick_delta_in_msec = 100;

params.ROMER_threshold_power = 2;
params.should_use_constant_forward_probability = true;
params.constant_forward_probability = 0.2;

num_of_ticks_to_deposit_packets = 10;
ticks_to_deposit_packets = 1:num_of_ticks_to_deposit_packets;

packet_size_in_bytes = 500;
number_of_packets_to_deposit_in_each_tick = 100;
%%%%%%%%%%%%%%%%%%%%%%%%
% Constant forward probability:
source_node_id = 26;
dest_node_id = 13;

SingletonInitializer.create_all_singletons();

topology_file_name = ['topology_', num2str(number_of_nodes), '_nodes.mat'];
topology = Topology.read_topology_from_file(topology_file_name, router_type);

statistics = Simulator.run_single_depositor_in_unloaded_network(topology, source_node_id, dest_node_id, packet_size_in_bytes, number_of_packets_to_deposit_in_each_tick, ticks_to_deposit_packets);

number_of_different_paths_constant = statistics.number_of_disjoint_paths
delivery_rates_constant = statistics.delivery_rate
network_load_constant = statistics.avg_network_load
romer_avg_num_of_duplicates_vector_constant = statistics.romer_avg_num_of_duplicates

%%%%%%%%%%%%%%%%%%%%%%%%
% Non-constant forward probability:

SingletonInitializer.reinit_all_singletons();
topology = Topology.read_topology_from_file(topology_file_name, router_type);
params.should_use_constant_forward_probability = false;

statistics = Simulator.run_single_depositor_in_unloaded_network(topology, source_node_id, dest_node_id, packet_size_in_bytes, number_of_packets_to_deposit_in_each_tick, ticks_to_deposit_packets);

number_of_different_paths = statistics.number_of_disjoint_paths
delivery_rates = statistics.delivery_rate
network_load = statistics.avg_network_load
romer_avg_num_of_duplicates_vector = statistics.romer_avg_num_of_duplicates
